package api;

import conf.APP;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import script.TestVerifyCode;
import utils.HttpClientUtils;
import utils.ResponseData;

public class CommonApi {
    private static final Logger logger = LoggerFactory.getLogger(CommonApi.class);

    //验证码url
    public static String verifyCodeUrl = APP.BASE_URL +"common/public/verifycode/%s";
    //获取图片验证码
    public ResponseData getVerifyCode(String random) throws Exception {
        logger.info("random={}",random);
        String url = String.format(verifyCodeUrl, random);
        return HttpClientUtils.get(url);
    }
}
